package cn.sc.allinpay.allfavour.business.common.data;

import android.os.Parcel;
import android.os.Parcelable;

import com.j256.ormlite.field.DataType;
import com.j256.ormlite.field.DatabaseField;

/**
 * description：发券记录
 * author：pany
 * on 2018/10/29 15:32
 */
public class DistCouponRecord implements Parcelable {

    @DatabaseField(generatedId = true)
    private int id;

    @DatabaseField(columnName = "TRANSNO", unique = true)
    private String transNo;//流水号

    @DatabaseField(columnName = "MERNAME")
    private String merName;//商户号

    @DatabaseField(columnName = "TERID")
    private String terId;//终端号

    @DatabaseField(columnName = "SEQNUM")
    private String seqNum;//序列号

    @DatabaseField(columnName = "TIME")
    private String time;//交易时间yyyyMMddHHmmss

    @DatabaseField(columnName = "TRANSDATE")
    private String transDate;//交易日期

    @DatabaseField(columnName = "TRANSTIME")
    private String transTime;//交易时间

    @DatabaseField(columnName = "COUPONID")
    private String couponId;//售券ID

    @DatabaseField(columnName = "COUPONNAME")
    private String couponName;//售券名称

    @DatabaseField(columnName = "COUPONNUM")
    private int couponNum;//售券数量

    @DatabaseField(columnName = "COUPONTYPE")
    private int couponType;//售券类型

    @DatabaseField(columnName = "COUPONAMT")
    private String couponAmt;//面额

    @DatabaseField(columnName = "COUPONUNIT")
    private String couponUnit;//单位

    @DatabaseField(columnName = "COUPONTOTCOUP")
    private String couponTotCoup;//库存

    @DatabaseField(columnName = "COUPONDESC")
    private String couponDesc;//卡券说明

    @DatabaseField(columnName = "URL")
    private String url;

    @DatabaseField(columnName = "OPERATOR")
    private String operator;//操作员

    @DatabaseField(columnName = "OPERATORNAME")
    private String operatorName;//操作员名称

    @DatabaseField(columnName = "DESC")
    private String desc;//扩展字段，暂时未用

    /************************发券详情**************************/
    @DatabaseField(columnName = "DISTCOUPONDATA", canBeNull = true, dataType = DataType.LONG_STRING)
    private String distCouponData;//distCouponData

    public DistCouponRecord() {

    }


    protected DistCouponRecord(Parcel in) {
        id = in.readInt();
        transNo = in.readString();
        merName = in.readString();
        terId = in.readString();
        seqNum = in.readString();
        time = in.readString();
        transDate = in.readString();
        transTime = in.readString();
        couponId = in.readString();
        couponName = in.readString();
        couponNum = in.readInt();
        couponType = in.readInt();
        couponAmt = in.readString();
        couponUnit = in.readString();
        couponTotCoup = in.readString();
        couponDesc = in.readString();
        url = in.readString();
        operator = in.readString();
        operatorName = in.readString();
        desc = in.readString();
        distCouponData = in.readString();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTransNo() {
        return transNo;
    }

    public void setTransNo(String transNo) {
        this.transNo = transNo;
    }

    public String getMerName() {
        return merName;
    }

    public void setMerName(String merName) {
        this.merName = merName;
    }

    public String getTerId() {
        return terId;
    }

    public void setTerId(String terId) {
        this.terId = terId;
    }

    public String getSeqNum() {
        return seqNum;
    }

    public void setSeqNum(String seqNum) {
        this.seqNum = seqNum;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getTransDate() {
        return transDate;
    }

    public void setTransDate(String transDate) {
        this.transDate = transDate;
    }

    public String getTransTime() {
        return transTime;
    }

    public void setTransTime(String transTime) {
        this.transTime = transTime;
    }

    public String getCouponId() {
        return couponId;
    }

    public void setCouponId(String couponId) {
        this.couponId = couponId;
    }

    public String getCouponName() {
        return couponName;
    }

    public void setCouponName(String couponName) {
        this.couponName = couponName;
    }

    public int getCouponNum() {
        return couponNum;
    }

    public void setCouponNum(int couponNum) {
        this.couponNum = couponNum;
    }

    public int getCouponType() {
        return couponType;
    }

    public void setCouponType(int couponType) {
        this.couponType = couponType;
    }

    public String getCouponAmt() {
        return couponAmt;
    }

    public void setCouponAmt(String couponAmt) {
        this.couponAmt = couponAmt;
    }

    public String getCouponUnit() {
        return couponUnit;
    }

    public void setCouponUnit(String couponUnit) {
        this.couponUnit = couponUnit;
    }

    public String getCouponTotCoup() {
        return couponTotCoup;
    }

    public void setCouponTotCoup(String couponTotCoup) {
        this.couponTotCoup = couponTotCoup;
    }

    public String getCouponDesc() {
        return couponDesc;
    }

    public void setCouponDesc(String couponDesc) {
        this.couponDesc = couponDesc;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getDistCouponData() {
        return distCouponData;
    }

    public void setDistCouponData(String distCouponData) {
        this.distCouponData = distCouponData;
    }

    public static final Creator<DistCouponRecord> CREATOR = new Creator<DistCouponRecord>() {
        @Override
        public DistCouponRecord createFromParcel(Parcel in) {
            return new DistCouponRecord(in);
        }

        @Override
        public DistCouponRecord[] newArray(int size) {
            return new DistCouponRecord[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(id);
        parcel.writeString(transNo);
        parcel.writeString(merName);
        parcel.writeString(terId);
        parcel.writeString(seqNum);
        parcel.writeString(time);
        parcel.writeString(transDate);
        parcel.writeString(transTime);
        parcel.writeString(couponId);
        parcel.writeString(couponName);
        parcel.writeInt(couponNum);
        parcel.writeInt(couponType);
        parcel.writeString(couponAmt);
        parcel.writeString(couponUnit);
        parcel.writeString(couponTotCoup);
        parcel.writeString(couponDesc);
        parcel.writeString(url);
        parcel.writeString(operator);
        parcel.writeString(operatorName);
        parcel.writeString(desc);
        parcel.writeString(distCouponData);
    }
}
